package com.hsgene.order.constants.v1;

/**
 * 物流寄送状态
 *
 * @author wangbing
 * @version 1.0, 2018/10/25
 */
public enum ExpressDeliveryStatus {

    /**
     * 物流寄送状态枚举
     */
    INIT("init", "待寄送"),
    CONFIRMED("confirmed", "已签收");

    private final String value;

    private final String desc;

    public String getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    ExpressDeliveryStatus(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static ExpressDeliveryStatus getEnum(String value) {
        for (ExpressDeliveryStatus status : values()) {
            if (status.value.equalsIgnoreCase(value)) {
                return status;
            }
        }

        throw new IllegalStateException("非法的物流寄送状态枚举值：" + value);
    }
}
